﻿using Autowired.Core;
using log4net;
using log4net.Layout.Decorators;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using WebApplication1.Service;

namespace WebApplication1.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class HelloController : Controller
    {
 
        public HelloController(AutowiredService autowiredService)
        {
            autowiredService.Autowired(this);
        }

        [Autowired]
        private ILog _log;

        [Autowired]
        private ISproutService sproutService;

        [HttpGet]
        public String Index()
        {
            StandardTypesDecorator aa = new StandardTypesDecorator();
 

            //log4net.GlobalContext.Properties["bmm"] = "fubar";


            _log.Info("AAA");
            _log.Error("CC");
            _log.Error("asda");

            var tmp = sproutService.demo();

            return "hello stupid .net!";
        }


    }
}
